# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-20 15:33
from __future__ import unicode_literals

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Noticia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipo', models.IntegerField(default=1, verbose_name='Tipo')),
                ('para', models.IntegerField(default=1, verbose_name='Dirigido a quienes?')),
                ('titulo', models.CharField(max_length=600, verbose_name='Título')),
                ('descripcion', models.CharField(max_length=9000, verbose_name='Descripción')),
                ('url', models.CharField(blank=True, default='', max_length=2000, verbose_name='URL externa')),
            ],
        ),
        migrations.CreateModel(
            name='NotificacionNoticia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipo', models.IntegerField(default=1, verbose_name='tipo')),
                ('visto', models.BooleanField(default=False, verbose_name='Visto?')),
                ('suscrito', models.BooleanField(default=False, verbose_name='El usuario se ha suscrito?')),
                ('titulo', models.CharField(max_length=500, verbose_name='Título de la notificación')),
                ('descripcion', models.CharField(max_length=5000, verbose_name='Descripción')),
                ('url', models.CharField(blank=True, default='', max_length=2000, verbose_name='URL externa (opcional)')),
            ],
        ),
        migrations.CreateModel(
            name='NotificacionSuscripcion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='PreInscripcionEstudiante',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='PreMateria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sigla', models.CharField(max_length=200, verbose_name='Sigla de la materia')),
                ('nombre', models.CharField(max_length=300, verbose_name='Nombre de la materia')),
                ('descripcion', models.CharField(max_length=1200, verbose_name='Descripción detallada')),
                ('cupos', models.IntegerField(verbose_name='Cupo máximo')),
                ('nombre_docente', models.CharField(default='', max_length=200, verbose_name='Nombre del docente (opcional)')),
                ('horario', models.CharField(default='', max_length=500, verbose_name='Horario (opcional)')),
                ('aula', models.CharField(default='', max_length=200, verbose_name='Aula (opcional)')),
                ('gestion', models.CharField(max_length=100, verbose_name='Gestión')),
                ('semestre', models.IntegerField(verbose_name='Semestre (1 al 10)')),
                ('pre_requisitos', models.CharField(default='', max_length=200, verbose_name='Pre requsitos (siglas materias)')),
            ],
        ),
        migrations.CreateModel(
            name='Suscripcion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre_actividad', models.CharField(max_length=500, verbose_name='Nombre de la actividad')),
                ('descripcion', models.CharField(max_length=5000, verbose_name='Descripción de la actividad')),
                ('cupo_maximo', models.IntegerField(verbose_name='Cupo máximo')),
                ('para', models.IntegerField(default=1, verbose_name='Dirigido a')),
                ('noticia', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='Ws.Noticia', verbose_name='Noticia en la que se basa (opcional)')),
            ],
        ),
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('username', models.CharField(db_index=True, error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 254 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=254, unique=True, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], verbose_name='username')),
                ('first_name', models.CharField(max_length=125, verbose_name='nombres')),
                ('last_name', models.CharField(max_length=125, verbose_name='apellidos')),
                ('is_admin', models.BooleanField(default=False, verbose_name='es admin')),
                ('ci', models.IntegerField(verbose_name='C.I.')),
                ('ru', models.IntegerField(default=0, verbose_name='Registro universitario')),
                ('tipo', models.IntegerField(default=1, verbose_name='Tipo')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name_plural': 'users',
                'verbose_name': 'user',
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='preinscripcionestudiante',
            name='pre_materia',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Ws.PreMateria', verbose_name='Materia pre inscrita'),
        ),
        migrations.AddField(
            model_name='preinscripcionestudiante',
            name='usuario',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Estudiante pre inscrito'),
        ),
        migrations.AddField(
            model_name='notificacionsuscripcion',
            name='suscripcion',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Ws.Suscripcion', verbose_name='Suscripcion a la que se ha suscrito'),
        ),
        migrations.AddField(
            model_name='notificacionsuscripcion',
            name='usuario',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Usuario que se ha suscrito'),
        ),
        migrations.AddField(
            model_name='notificacionnoticia',
            name='usuario',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Usuario a la que va dirigida'),
        ),
    ]
